<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <title>我的相册</title>
	{php echo register_jssdk(false);}
	<script src="{MEEPORES}/static/friend/js/love.js" ></script>
    <style>
        html,body,div,span,iframe,h1,h2,h3,h4,h5,h6,p,pre,a,em,img,small,strong,b,i,dl,dt,dd,ol,ul,li,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,footer,header,menu,nav,section{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}aside,footer,header,menu,nav,section{display:block}ol,ul{list-style:none}table{border-collapse:collapse;border-spacing:0}a{display:inline-block;text-decoration:none;cursor:default}
        body{background:#f0f0f0;color:#999;font-size:16px;height:100%}html{height:100%}a,a:link,a:visited,a:hover,a:active{display:inline-block;text-decoration:none;color:#75b9c6;background-color:rgba(0,0,0,0)}img{background:#f0f0f0 url(/resources/v20/images/loading.gif) center center no-repeat;background-size:16px}.hidden{display:none}.pink{color:#ee3869}.yellow{color:#fff17e}.blue{color:#75b9c6}.waiting{width:104px;height:82px;line-height:120px;background:rgba(0,0,0,0.5) url(/resources/v20/images/loading.gif) center 14px no-repeat;background-size:20px;position:fixed;left:50%;top:150px;margin:-41px 0 0 -52px;border-radius:10px;color:#fff;text-align:center;display:none;z-index:1000}.tips{width:80%;height:50px;overflow:hidden;line-height:50px;background:rgba(0,0,0,0.5);border-radius:10px;color:#fff;text-align:center;display:none;position:fixed;top:20%;left:10%;z-index:1000;border:1px solid #fff}.loading{display:none;width:100%;height:50px;line-height:50px;text-align:center}.loading i{display:inline-block;height:20px;width:30px;margin-bottom:-4px;background:url(/resources/v20/images/loading.gif) 10% center no-repeat;background-size:20px}.nav{width:100%;height:50px;line-height:50px;border-bottom:2px solid #f78aa9;background:rgba(249,249,249,1);text-align:center;position:fixed;left:0;top:0;right:0;z-index:100;box-shadow:1px 1px 2px rgba(0,0,0,0.1)}.nav h2{color:#555;font-size:16px;font-weight:bold}.nav .left,.nav .right{display:block;font-size:16px;position:absolute;top:0;height:50px;color:#555;padding:0 10px}.nav .left{left:0}.nav .right{right:0}.nav .le_trg{margin:18px 0 0 0}.le_trg{display:inline-block;width:9px;height:9px;border-right:2px solid #555;border-bottom:2px solid #555;transform:rotate(135deg);-webkit-transform:rotate(135deg);-moz-transform:rotate(135deg);-o-transform:rotate(135deg);-ms-transform:rotate(135deg)}.re_trg{display:inline-block;width:9px;height:9px;border-right:2px solid #ccc;border-bottom:2px solid #ccc;transform:rotate(-45deg);-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-o-transform:rotate(-45deg);-ms-transform:rotate(-45deg)}.bot_trg{display:inline-block;width:9px;height:9px;border-right:2px solid #ccc;border-bottom:2px solid #ccc;transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);-ms-transform:rotate(45deg);margin-top:-10px}.top_trg{display:inline-block;width:9px;height:9px;border-right:2px solid #ccc;border-bottom:2px solid #ccc;transform:rotate(-135deg);-webkit-transform:rotate(-135deg);-moz-transform:rotate(-135deg);-o-transform:rotate(-135deg);-ms-transform:rotate(-135deg)}.top_blank{margin-top:52px}.content{padding:10px}.see_more{font-size:16px;display:block;height:42px;line-height:42px;background:#fff;color:#72bac6;text-align:center;margin:10px 0;box-shadow:1px 1px 2px rgba(0,0,0,0.1);font-weight:bold}.box-shadow{box-shadow:1px 1px 2px rgba(0,0,0,0.1)}.phone,.identity,.vip{display:inline-block;height:22px;line-height:22px;padding:0 5px 0 20px;border-radius:2px;margin-right:3px;color:#fff;font:12px/24px "寰蒋闆呴粦","Microsoft YaHei";font-style:normal}.phone{background:#00c5c4 url(/resources/v20/images/icon_phone.png) no-repeat 4px center;background-size:14px 14px}.identity{background:#2acb64 url(/resources/v20/images/icon_write.png) no-repeat 4px center;background-size:14px 14px}.vip{background:#f1668f;padding:0 7px}.noCheck{background-color:#d5d5d5}.icon-loading{background-image:url(/resources/v20/images/loading.gif);background-size:contain;display:inline-block;width:16px;height:16px;margin:0 5px;vertical-align:middle}.loadApp{padding:8px 10px;background:#fff;position:relative;overflow:hidden}.loadApp dt{float:left;height:42px}.loadApp dt img{display:block;width:40px;height:40px}.loadApp dd{float:left;margin:0 0 0 8px}.loadApp dd b{display:block;color:#555;font-size:16px}.loadApp dd p{padding:7px 0 0;font-size:14px;color:#717171}.loadApp .upload_btn{position:absolute;right:10px;top:15px;display:block;width:72px;height:26px;line-height:26px;text-align:center;color:#ee356e;border:1px solid #f3c4d4}.attention{width:100%;height:54px;background:rgba(0,0,0,.7);position:fixed;left:0;bottom:0;padding:0 10px;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-o-box-sizing:border-box;-ms-box-sizing:border-box;color:#fff;display:none}.attention dt{float:left}.attention dd{float:left;margin:8px 0 0}.attention dd>p{font-size:12px;margin:2px 0 0}.attention dt>img{display:block;width:38px;background:rgba(0,0,0,.0);margin:8px 10px 0 0}.attention .atte_btn{position:absolute;right:10px;top:12px;display:block;width:74px;height:30px;line-height:30px;color:#fff;background:#ec2e90;font-size:12px;text-align:center;border-radius:3px}.min_nav{width:100%;height:50px;line-height:50px;background:#fafafa;position:fixed;left:0;top:0;right:0;z-index:100;box-shadow:1px 1px 2px rgba(0,0,0,0.1);text-align:center}.min_nav .title{color:#555;font-weight:bold}.min_nav .title .vip{display:inline-block;width:24px;height:14px;line-height:14px;background:#ef678f;text-align:center;border-radius:2px;color:#fff;font-size:10px;margin:0 0 0 4px}.min_nav .reture{position:absolute;left:0;top:0}.min_nav .reture .le_trg{float:left;margin:20px 0 0 10px}.min_nav .reture .but,.min_nav .next{display:inline;float:left;color:#555;font-size:.9em}.min_nav .next,.min_nav .repair{position:absolute;right:10px;top:0;color:#555;font-size:.9em}.min_nav .repair .house_icon{display:block;width:20px;height:50px;background:url(../images/house.png) center center no-repeat;background-size:16px}.min_nav .seach_sure{display:block;width:50px;height:26px;line-height:26px;background:#ed376a;position:absolute;right:10px;top:7px;text-align:center;color:#fff;border-radius:3px;font-size:.9em}.min_nav .give_up{position:absolute;left:10px;top:0}.personIcon{width:22px;height:22px;display:inline-block;position:relative;bottom:-4px;margin-left:5px;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;display:none;background:url('/resources/v20/images/personIcon.png') no-repeat center center,-webkit-radial-gradient(#fff7d7,#ffd739);background:url('/resources/v20/images/personIcon.png') no-repeat center center,-moz-radial-gradient(#fff7d7,#ffd739);background:url('/resources/v20/images/personIcon.png') no-repeat center center,radial-gradient(#fff7d7,#ffd739);background-size:100%}
        .disbox-hor{box-sizing:border-box;display:box;display:-webkit-box;display:-moz-box;display:-ms-box;box-orient:horizontal;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-ms-box-orient:horizontal}.disbox-ver{box-sizing:border-box;display:box;display:-webkit-box;display:-moz-box;display:-ms-box;box-orient:vertical;-webkit-box-orient:vertical;-moz-box-orient:vertical;-ms-box-orient:vertical}.disbox-center{box-sizing:border-box;display:-webkit-box;display:-moz-box;display:-ms-box;display:box;box-pack:center;-webkit-box-pack:center;-moz-box-pack:center;-ms-box-pack:center;box-align:center;-webkit-box-align:center;-webkit-box-align:center;-moz-box-align:center}.disbox-flex{box-flex:1;-webkit-box-flex:1;-moz-box-flex:1;-ms-box-flex:1}
        .common_alert .articial{display:block;font-size:20px;line-height:26px;color:#555;padding:60px 10px}.common_alert .bot_btn,.common_alert .btn{display:block;color:#72bac6;border-top:1px solid #e9e9e9;overflow:hidden;position:absolute;left:0;bottom:0;right:0}.common_alert .bot_btn span{display:block;width:50%;float:left;height:34px;line-height:34px;background:#f7f7f7;border:0}.common_alert .bot_btn span:first-child{margin:0 1px 0 0;width:48.9999%}.popup.back{background:black;position:fixed;width:100%;height:100%;opacity:.3!important;z-index:1000000;top:52px;left:0}.popup.multiMsg{display:block;position:fixed;height:auto;min-height:120px;background:none repeat scroll 0 0 #fff;left:50%;top:50%;z-index:1000010;margin:-80px 0 0 -150px;border-radius:5px;padding:5px 10px;width:280px;color:#666}.popup .header{height:30px;border-bottom:1px solid #999}.popup .header strong{line-height:30px;padding-left:10px}.popup .header .close{float:right;line-height:30px;padding-right:10px}.popup p{font-size:14px;margin-top:10px}.popup .btn{font-size:14px;display:block;margin:10px auto;width:120px;height:36px;line-height:36px;text-align:center;background:#ed376a;border-radius:5px;color:#fff}
        .my_photo{line-height:22px;color:#555}.my_photo>.top{margin:0 0 10px 0}.my_photo .add_photo{width:100%;overflow:hidden;background:#fff;padding:0 0 16px 0;box-shadow:1px 1px 2px rgba(0,0,0,0.1)}.my_photo .add_photo li{width:90px;height:90px;float:left;margin-left:10px;margin-top:10px;position:relative;text-align:center}.my_photo .add_photo li img{width:90px;height:90px}.my_photo .add_photo li.add_icon{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-o-box-sizing:border-box;-ms-box-sizing:border-box;border:3px dashed #ccc;background-color:#f0f0f0;font-size:90px;line-height:100px;font-weight:bold;color:#ccc;font-family:'黑体'}.my_photo .add_photo li .loading,.my_photo .add_photo li .loading .state{display:block;width:100%;height:24px;line-height:24px;text-align:center;color:#fff;background:rgba(0,0,0,0.5);position:absolute;left:0;bottom:0}.my_photo .add_photo li .loading .state{background:rgba(29,90,111,0.8)}.my_photo .add_photo li .blue_loading{background:rgba(29,90,111,0.8)}.my_photo ul.quick_pass{line-height:24px;margin:10px 0 0 0}.my_photo .quick_pass li span.bule{text-decoration:underline;color:#72b5c5}.simple_info{width:80%;height:250px;background:#fff;position:fixed;left:50%;top:50%;margin:-120px 0 0 -40%;text-align:center;z-index:1001;overflow:hidden}.simple_info .title{height:30px;border-bottom:1px solid #e9e9e9;font-size:1.2em}.simple_info .title span{display:block;width:35%;height:30px;line-height:30px;color:#333;border-bottom:1px solid #adadad}.simple_info .examine{margin:30px 0}.simple_info .examine dd.tit{font-size:1.2em;color:#555;margin:8px 0}.simple_info .btn{display:block;color:#72bac6;height:34px;line-height:34px;background:#f7f7f7;border-top:1px solid #e9e9e9}.simple_info .closed{display:block;width:14px;height:14px;background:url(/resources/v20/images/closed_black.png) no-repeat;position:absolute;right:8px;top:8px}
    </style>
</head>
<body>
<input type="hidden" id="GUID" value="278476631"/>
<div class="top_blank"></div>
<nav class="nav" style="position: absolute;">
    <h2>我的相册</h2>
    <div class="left" >
        <i class="le_trg"></i><a href="{php echo  $this->createMobileUrl('homecenter')}" style="color:#555">返回</a>
    </div>
</nav>
<div class="content">
    <section class="my_photo">
        <p class="top">传几张靓照，找朋友吧！</p>
        <ol class="add_photo" id="all">

            
                <li id="add_photo" class="disbox-center add_icon" style="font-size:1.2em">点击上传</li>
           {if !empty($photos)}
   
	  {loop $photos $row}
     <li class="father"><a id="del"  onclick="return confirm('确认删除吗？');return false;" href="{php echo $this->createMobileUrl('deletephotos',array('id'=>$row['id']))}">删除</a><img src="{$_W['siteroot']}attachment/{$row['url']}" id="btn"><input type="hidden" id="check{$row['id']}" value="{$_W['attachurl']}{$row['url']}" />{if $row['status']!=1}<div class="loading" style="font-size:16px">待审核</div>{/if}</li>
	  {/loop}
   {/if}
                

            

        </ol>
        <ul class="quick_pass">
            <li>1.单张照片不能超过1M且必须为JPG格式的图片</li>
            <li>2.上传过程中请不要离开当前页面</li>
            <li>3.完善资料能够更快的通过审核哦！<span><a href="{php echo  $this->createMobileUrl('userinfo')}" class="bule">点我完善资料</a></span></li>
        </ul>
    </section>
</div>
<style>
 #del{
display: block;
width: 100%;
height: 16px;
line-height: 16px;
text-align: center;
color: #fff;
background: rgba(0,0,0,0.5);
position: absolute;
left: 0;
top: 0;
}
</style>
</body>

</script>    
<script type="text/javascript">
  wx.ready(function () {
    var shareData = {
    title: "{$settings['title']}",
    desc: "{$settings['share_content']}",
    link: "{$settings['share_link']}",
    imgUrl: "{$_W['attachurl']}{$settings['share_logo']}",
  };
  
  //分享朋友
  wx.onMenuShareAppMessage({
       title: shareData.title,
      desc: shareData.desc,
      link: shareData.link,
      imgUrl:shareData.imgUrl,
      trigger: function (res) {
      },
      success: function (res) {
        send_intergal();
      },
      cancel: function (res) {
      },
      fail: function (res) {
        alert(JSON.stringify(res));
      }
    });
 //朋友圈
  wx.onMenuShareTimeline({
      title: shareData.title+"---"+shareData.desc,
      link: shareData.link,
      imgUrl:shareData.imgUrl,
      trigger: function (res) {
      },
      success: function (res) {
          send_intergal();
      },
      cancel: function (res) {
      },
      fail: function (res) {
        alert("分享失败,网络超时！！！！");
      }
    });   
    
  });
 var images = {
    localId: [],
    serverId: []
  };
  $("#add_photo").click(function(){
    wx.chooseImage({
        success: function (res) {
            var localIds = res.localIds;
            syncUpload(localIds);
        }
    });
});
var syncUpload = function(localIds){
    var localId = localIds.pop();
    wx.uploadImage({
        localId: localId,
        isShowProgressTips: 1,
        success: function (res) {
            var serverId = res.serverId; // 返回图片的服务器端ID
            downphotos(serverId);
            if(localIds.length > 0){
                syncUpload(localIds);
            }
        }
    });
};
function downphotos(id){
	var cr = '';
   $.ajax({
			type:"POST",
			url:"{php echo $this->createMobileUrl('UploadImage2')}",
			data:{id:id},
			cache:false,
			success:function(data){
			   //alert(data);
               if(data != '0'){
			         cr += '<li class="father"><img src="{$_W['attachurl']}' + data + '" id="btn"><input type="hidden" id="check{$row['id']}" value="{$_W['attachurl']}' + data + '" /><div class="loading" style="font-size:16px">{if $cfg['isstatus']==0}sucess{else}待审核{/if}</div></li>';
					 $('#add_photo').after(cr);
			   }else{
			     alert('上传失败');
			   }
			}
		});
}
function send_intergal(){
   $.ajax({
			type:"POST",
			url:"{php echo $this->createMobileUrl('shareajax')}",
			data:{openid:'{$openid}}'},
			cache:false,
			success:function(data){
				if(data=="no"){
					alert("分享成功,抱歉，网络超时，获取积分失败！！！");
                   
				}
				else if(data=="over"){
				  alert("分享成功,你今天的分享次数已经超过上限哦，请明天再来吧！！！");
				
				}
				else{
				   alert("分享成功,恭喜您，获得{$settings['share_jifen']}个奖励积分！今天你还有"+data+"次分享赚积分机会哦！");
				}
			}
		});
}
$("#btn").live("click",function (event) {
	var alli = new Array();
	var newall = new Array();
	var b = $(this).attr('src');
	//var b = $('#check'+id).val();
	var allp = $(".add_photo").children("li.father");
	for(var j=0;j<allp.length;j++){
			alli[j]=allp.eq(j).find("input").val();
			
			
			newall.push(alli[j]);
	}
	
	wx.previewImage({
       
      current:b,
      urls: newall
	
    });
});
        </script>


</html>